# 作者：宋安康
# 开发时间：2023/6/27 13:10
from PyQt5.QtWidgets import QApplication, QDialog, QMainWindow
from PyQt5.uic import loadUi

class MyWindow(QDialog):
    def __init__(self):
        super(MyWindow, self).__init__()
        loadUi("mygui.ui", self)

        self.pushButton.clicked.connect(self.change_text1)
        self.pushButton_2.clicked.connect(self.change_text2)

    def change_text1(self):
        self.label.setText("Hello, World! 1")

    def change_text2(self):
        self.label.setText("Hello, World! 2")


app = QApplication([])
win = MyWindow()
win.show()
app.exec_()